
import 'package:floor/floor.dart';

import '../entity/CustomerBill.dart';

@dao
abstract class CustomerBillDao {

  @Query('DELETE FROM CustomerBill')
  Future<void> deleteAll();

  @Query('DELETE FROM CustomerBill WHERE id = :id')
  Future<void> deleteById(int id);

  @Query('SELECT * FROM CustomerBill')
  Future<List<CustomerBill>> findAll();

  @Query('SELECT * FROM CustomerBill WHERE id = :id')
  Future<CustomerBill?> findById(int id);

  @insert
  Future<int> insertOne(CustomerBill bill);
}